using System;
using System.Collections.Generic;
using System.Text;
using moDb_prototype.Core;

namespace moDb_prototype
{
    public class ManagedRecordCollection<T> : List<T> where T : IManagedRecord<T>, new() 
    { 
        public ManagedRecordCollection()
        {
            
        }

        public void Save()
        {
            foreach (IManagedRecord<T> record in this)
            {
                record.Save();
            }            
        }
        public void Load(int id)
        {
            foreach (IManagedRecord<T> record in this)
            {
                record.ID = id; 
                record.Load(id);
            }
        }
        public void LoadAll()
        {

        }
        public void LoadWhere(string conditions)
        {
        }
    }
}
